package com.bdqn.ch03.SZ.sz1;

/**
 * DivideCalculate
 * 取模运算
 * @aurhor Administrator  whs
 * @since 2024/7/4
 */
public class RemainderCalculateImpl implements Calculate{
    /**
     * 算法接口
     * 取余运算
     * @param number1 第一个值
     * @param number2 第二个值
     * @return
     */
    @Override
    public double Calculates(Double number1, Double number2) {
        if (number2 != 0) {
            return (number1 % number2);
        }else {
            throw new IllegalArgumentException(" 除数不能为0 ");
        }
    }
}
